From bef1c6925493092ebe74a1edc67aa2b7ef896694 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Tue, 13 Jun 2023 13:00:15 -0500 Subject: [PATCH] Change recommended replacement for gtk_show_uri() Problem is GtkFileLauncher is unable to handle all the types of URIs that are supported by gtk_show_uri(), e.g. help: URIs. GtkUriLauncher avoids this problem. Another problem is that GtkUriLauncher is just generally a better choice for launching URIs, since you don't have to create a GFile in order to use it. Porting code is slightly simpler. The documentation still mentions both GtkFileLauncher and GtkUriLauncher as options, but most people will use whatever the compiler recommends when it prints the deprecation warning. --- gtk/deprecated/gtkshow.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk/deprecated/gtkshow.h b/gtk/deprecated/gtkshow.h index a174808ce9..6aa6321d90 100644 --- a/gtk/deprecated/gtkshow.h +++ b/gtk/deprecated/gtkshow.h @@ -28,7 +28,7 @@ G_BEGIN_DECLS -GDK_DEPRECATED_IN_4_10_FOR(gtk_file_launcher_launch) +GDK_DEPRECATED_IN_4_10_FOR(gtk_uri_launcher_launch) void gtk_show_uri_full (GtkWindow *parent, const char *uri, guint32 timestamp, @@ -36,12 +36,12 @@ void gtk_show_uri_full (GtkWindow *parent, GAsyncReadyCallback callback, gpointer user_data); -GDK_DEPRECATED_IN_4_10_FOR(gtk_file_launcher_launch) +GDK_DEPRECATED_IN_4_10_FOR(gtk_uri_launcher_launch) gboolean gtk_show_uri_full_finish (GtkWindow *parent, GAsyncResult *result, GError **error); -GDK_DEPRECATED_IN_4_10_FOR(gtk_file_launcher_launch) +GDK_DEPRECATED_IN_4_10_FOR(gtk_uri_launcher_launch) void gtk_show_uri (GtkWindow *parent, const char *uri, guint32 timestamp); -- 2.30.2